home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / BISON-TC / THINK_C_.NOT < prev    next >
Text File  |  1990-02-19  |  2KB  |  49 lines

  1. Notes on the THINK C version of Bison
  2. Russell S. Finn, 19-FEB-90
  3. Internet: rsfinn@athena.mit.edu, rsfinn@neutron.lcs.mit.edu
  4. CompuServe: 76377,1107
  5. GEnie: RSFINN
  6.  
  7. Apparently, Richard Stallman and the Free Software Foundation discourage
  8. the porting of FSF software to Apple computers, after the Microsoft/HP
  9. lawsuit.  However, I've owned a Macintosh for four years, and I needed
  10. to do this project at home, so I chose to port Bison to the Macintosh.
  11. I believe an MPW implementation already exists, but I don't own MPW,
  12. so this version (created with THINK C 4.0) is the result.  While I will
  13. not be sending this version to the FSF (since I don't think they really
  14. want it), I am following the terms of their General Public License
  15. (which may be found in the file "COPYING"); hence this package includes
  16. both the executable application and the entire source code distribution,
  17. as I received it.
  18.  
  19. The current version (modification date January 23, 1990) has only the
  20. bare-bones interface provided by the THINK C library routine "ccommand",
  21. which allows the user to type a command line and to redirect the output.
  22. Perhaps someday I may try to implement a "real" user interface; perhaps
  23. not.
  24.  
  25. The only modifications made to the source file are surrounded by "#ifdef
  26. THINK_C"..."#endif"; in theory, then, these sources could be recompiled
  27. on another system if necessary.  These are the actual files modified:
  28. alloca.c, allocate.c, conflicts.c, files.c, getopt.c, machine.h,
  29. main.c, reader.c, system.h.  Most of these changes were minor, and many
  30. of them would have been unnecessary if the original Bison source code
  31. had been written for an ANSI-compliant C compiler.
  32.  
  33. THINK C users may find it convenient to have the output text files written
  34. by Bison be THINK C documents.  To do this, create a copy of the "ANSI"
  35. project called "ANSI-KAHL", and a copy of the file "fopen.c" called
  36. "fopen-KAHL.c".  In the copy, find the routine "setfiletype", and replace
  37. the lines:
  38.     if (!(oflag & F_BINARY))
  39.         pb.ioFlFndrInfo.fdType = 'TEXT';
  40. with the lines:
  41.     if (!(oflag & F_BINARY)) {
  42.         pb.ioFlFndrInfo.fdType = 'TEXT';
  43.         pb.ioFlFndrInfo.fdCreator = 'KAHL';
  44.         }
  45. Replace "fopen.c" with the new "fopen-KAHL.c", rebuild the new project
  46. "ANSI-KAHL", and use this project in the project file "Bison.╣"
  47. instead of the "ANSI" project.
  48.  
  49.